<?php
function XSRF($s){
	$ref=parse_url($_SERVER['HTTP_REFERER']);
	if(($ref['host']==$_SERVER['HTTP_HOST'])&&(basename($ref['path'])==$s)) return true;
}
function view_size($size){
 if (!is_numeric($size)) {
return false;
 }else{
  if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";}
  elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";}
  elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";}
  else {$size = $size . " B";}
  return $size;
 }
}
function clean($s){
	$s = str_replace("'","",$s);
	$s = str_replace("\"","",$s);
	$s = str_replace("(","",$s);
	$s = str_replace(")","",$s);
	$s = str_replace("#","",$s);
	return $s;
}
?>